Essentials Ollama
Ollama CLI Essentials
ollama --version
What: Shows the installed Ollama CLI version.
Why: Verify your Ollama version to ensure compatibility.
How: Run in your terminal.
Example:
ollama --version
ollama pull <model>
What: Downloads a model from the Ollama registry.
Why: You need the model locally to run it.
How: Replace <model>
with the model name.
Example:
ollama pull llama2
ollama run <model>
What: Runs the specified model locally.
Why: Interact with the model to generate text.
How: Replace <model>
with the model name.
Example:
ollama run llama2
ollama list
What: Lists all locally installed models.
Why: Check which models you have.
How: Run in terminal.
Example:
ollama list
ollama stop <model>
What: Stops a running model.
Why: Free system resources.
How: Replace <model>
with the model name.
Example:
ollama stop llama2
ollama delete <model>
What: Deletes a model from local storage.
Why: Free up disk space.
How: Replace <model>
with the model name.
Example:
ollama delete llama2